<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('系统设置')" />
	<style type="text/css">
		.logo-img{width:112px;height:32px;float:left;border: solid 1px #ccc;margin-right: 10px;}
		.layui-form-item{margin-top:0;margin-bottom:0;}
		.layui-inline{margin:0 0 15px 0 !important}
		.layui-block{margin:0 0 15px 0 !important}
		.float-lt{float:left;}
		.float-rt{float:right;}
		.layui-form-label{width:200px;padding-left:80px;color:#142A48;}
		.layui-input{width: 310px;height:32px;color:#142A48;}
		.layui-input:hover{border-color: #4592FA !important;}
		.layui-form-select dl dd.layui-this {background-color: #4592FA;}
		.layui-form-onswitch {border-color: #0087FA;background-color: #0087FA;}
		.layui-btn-container .layui-btn {margin-right: 16px;margin-bottom: 16px;}
		.layui-btn-primary{background-color:#e5e5e5;color:#142A48;border-color: #e5e5e5;}
		.layui-btn-primary:hover {border-color: #e5e5e5;}
		.save-btn{position:fixed;bottom:0;left:0;text-align:right;}
	</style>
</head>
<body>
<blockquote class="layui-elem-quote">全局设置，用户需重新登陆生效！</blockquote>
<form class="layui-form" id="form-menu-add" style="padding: 10px;">
	<input type="hidden" id="guid" name="guid"  th:value="${systemSetting?.guid}">
	<div class="layui-col-lg6  layui-col-md12 layui-col-xs12">
		<div class="layui-col-lg12" style="margin:0 0 15px 0 !important;height:32px;">
			<label class="layui-form-label">系统Logo：</label>
			<div class="layui-block">
				<div class="text_c">
					<img class="logo-img" th:src="${systemSetting['systemLogo']} eq '' or ${systemSetting['systemLogo']} == null? @{/img/logo-v2.png} : ${systemSetting?.systemLogo}">
					<a style="color:#23527c;display: block;float: left;height: 32px;line-height: 32px;" href="javascript:avatar()">更换Logo</a>
				</div>
			</div>
		</div>
		<!-- 	<div class="layui-form-item"> -->
		<!-- 	  <label class="layui-form-label">系统名称：</label> -->
		<!-- 	  <div class="layui-inline" style="width:30%"> -->
		<!-- 	    <input type="text" name="systemName" id="systemName" th:value="${systemSetting?.systemName}" lay-verify="required" autocomplete="off" placeholder="请输入" class="layui-input"> -->
		<!-- 	  </div> -->
		<!-- 	</div> -->
		<div class="layui-col-lg12">
			<div class="layui-block">
				<label class="layui-form-label">查询条件类型：</label>
				<div class="layui-input-inline">
					<select name="conditionsType">
						<option></option>
						<option th:each="dataLimitMap:${dataLimitMap}" th:value="${dataLimitMap.key}" th:text="${dataLimitMap.value}" th:selected="${dataLimitMap.key} eq ${systemSetting?.conditionsType}"></option>
					</select>
				</div>
			</div>
			<div class="layui-block">
				<label class="layui-form-label">默认排序：</label>
				<div class="layui-input-inline">
					<select name="orderByNid">
						<option></option>
						<option value="asc" th:selected="${systemSetting?.orderByNid} eq 'asc'">升序</option>
						<option value="desc" th:selected="${systemSetting?.orderByNid} eq 'desc'">降序</option>
					</select>
				</div>
			</div>
		</div>
		<div class="layui-col-lg12">
			<div class="layui-block">
				<label class="layui-form-label">数量小数位数：</label>
				<div class="layui-input-inline">
					<select name="decimalForNumber">
						<option></option>
						<option th:each="dict:${#numbers.sequence(0,6)}" th:value="${dict}" th:text="${dict}" th:selected="${dict} eq ${systemSetting?.decimalForNumber}"></option>
					</select>
				</div>
			</div>
			<div class="layui-block">
				<label class="layui-form-label">百分比小数位数：</label>
				<div class="layui-input-inline">
					<select name="decimalForPercent">
						<option></option>
						<option th:each="dict:${#numbers.sequence(0,6)}" th:value="${dict}" th:text="${dict}" th:selected="${dict} eq ${systemSetting?.decimalForPercent}"></option>
					</select>
				</div>
			</div>
			<div class="layui-block">
				<label class="layui-form-label">单价小数位数：</label>
				<div class="layui-input-inline">
					<select name="decimalForPrice">
						<option></option>
						<option th:each="dict:${#numbers.sequence(0,6)}" th:value="${dict}" th:text="${dict}" th:selected="${dict} eq ${systemSetting?.decimalForPrice}"></option>
					</select>
				</div>
			</div>
			<div class="layui-block">
				<label class="layui-form-label">金额小数位数：</label>
				<div class="layui-input-inline">
					<select name="decimalForSum">
						<option></option>
						<option th:each="dict:${#numbers.sequence(0,6)}" th:value="${dict}" th:text="${dict}" th:selected="${dict} eq ${systemSetting?.decimalForSum}"></option>
					</select>
				</div>
			</div>
		</div>
		<div class="layui-col-lg12">
			<div class="layui-block">
				<label class="layui-form-label">附件删除期限(天)：</label>
				<div class="layui-input-inline">
					<input type="text" name="decimalForDelFile" id="decimalForDelFile" th:value="${systemSetting?.decimalForDelFile}" autocomplete="off" class="layui-input" lay-verify="number">
				</div>
			</div>
			<div class="layui-block">
				<label class="layui-form-label">身份验证过期时间(分钟)：</label>
				<div class="layui-input-inline">
					<input type="text" name="passwordPeriodMM" id="passwordPeriodMM" th:value="${systemSetting?.passwordPeriodMM}" autocomplete="off" class="layui-input" lay-verify="number">
				</div>
			</div>
			<div class="layui-block">
				<label class="layui-form-label">非保留邮件保留天数(天)：</label>
				<div class="layui-input-inline">
					<input type="text" name="mailDelDays" id="mailDelDays" th:value="${systemSetting?.mailDelDays}" autocomplete="off" class="layui-input" lay-verify="number">
				</div>
			</div>
			<div class="layui-block">
				<label class="layui-form-label">已删除邮件保留天数(天)：</label>
				<div class="layui-input-inline">
					<input type="text" name="mailDelSupDays" id="mailDelSupDays" th:value="${systemSetting?.mailDelSupDays}" autocomplete="off" class="layui-input" lay-verify="number">
				</div>
			</div>
		</div>
		<div class="layui-col-lg12">
			<div class="layui-block">
				<label class="layui-form-label">劳动合同续签提前提醒天数：</label>
				<div class="layui-input-inline">
					<input type="text" name="remindDaysForContract" id="remindDaysForContract" th:value="${systemSetting?.remindDaysForContract}" autocomplete="off" class="layui-input" lay-verify="number">
				</div>
			</div>
		</div>
	</div>
	<div class="layui-col-lg6 layui-col-md12 layui-col-xs12">
		<div class="layui-col-lg12">
			<!-- 		<div class="layui-inline"> -->
			<!-- 		  <label class="layui-form-label">启用代理功能：</label> -->
			<!-- 		  <div class="layui-input-inline"> -->
			<!-- 			<input type="checkbox" name="agentEnable" lay-skin="switch" lay-text="是|否" th:checked="${systemSetting?.agentEnable}" value="1"> -->
			<!-- 		  </div> -->
			<!-- 		</div> -->
			<div class="layui-block">
				<label class="layui-form-label">针对销售员设置客户商务：</label>
				<div class="layui-input-inline">
					<input type="checkbox" name="sharedForCG" lay-skin="switch" lay-text="是|否" th:checked="${systemSetting?.sharedForCG}" value="1">
				</div>
			</div>
			<div class="layui-block">
				<label class="layui-form-label">启用实际进价：</label>
				<div class="layui-input-inline">
					<input type="checkbox" name="fPriceEnable" lay-skin="switch" lay-text="是|否" th:checked="${systemSetting?.fPriceEnable}" value="1">
				</div>
			</div>
			<div class="layui-block">
				<label class="layui-form-label">允许跨公司出货：</label>
				<div class="layui-input-inline">
					<input type="checkbox" name="crossCompanySales" lay-skin="switch" lay-text="是|否" th:checked="${systemSetting?.crossCompanySales}" value="1">
				</div>
			</div>
			<div class="layui-block">
				<label class="layui-form-label">允许跨公司订货：</label>
				<div class="layui-input-inline">
					<input type="checkbox" name="crossCompanyOrder" lay-skin="switch" lay-text="是|否" th:checked="${systemSetting?.crossCompanyOrder}" value="1">
				</div>
			</div>
			<div class="layui-block">
				<label class="layui-form-label">允许调拨他人库存(借货)：</label>
				<div class="layui-input-inline">
					<input type="checkbox" name="crossUserModify" lay-skin="switch" lay-text="是|否" th:checked="${systemSetting?.crossUserModify}" value="1">
				</div>
			</div>
			<div class="layui-block">
				<label class="layui-form-label" style="margin-left:-50px;width:250px">以含税/未税面价进行单价与折扣互算：</label>
				<div class="layui-input-inline">
					<input type="checkbox" name="discountMethod" lay-skin="switch" lay-text="含税|未税" th:checked="${systemSetting?.discountMethod}" value="1">
				</div>
			</div>
		</div>
	</div>
	<div class="layui-col-lg12 save-btn">
		<div class="layui-input-block">
			<div class="layui-btn-container">
				<input class="layui-btn layui-table-tools" type="button" lay-submit="" lay-filter="btn_save" value="保存">
				<input class="layui-btn layui-btn-primary layui-table-tools" type="button" onclick="closeTab()" value="关闭">
			</div>
		</div>
	</div>
</form>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
	/*<![CDATA[*/
	var prefix = ctx + "system/setting";
	/*]]>*/
</script>
<script>
	$(".logo-img").css("background",$(".layui-layout-admin .layui-logo", parent.document.body).css("backgroundColor"));
	/*上传logo*/
	// $(".layui-elem-quote").css("backgroundColor",pellucidityTwo)
	function avatar() {
		var url = prefix + '/systemlogo';
		$.modal.open('修改系统Logo',url,'800','600',function(index){
			var res = window["layui-layer-iframe" + index].updateLogo();
		});
	}
	var $,layer,form,table,element;
	layui.use(['table','form','layer','jquery','element'], function () {
		$ = layui.$,layer = layui.layer,form = layui.form,table = layui.table,element=layui.element;
		form.render();
		element.render();
		//提交按钮
		form.on('submit(btn_save)', function(data){
			$.operate.post(prefix + "/editpost", {'settingItems':JSON.stringify([$.common.formToJSON('form-menu-add')])});
		});
	});
	function closeTab(){//关闭
		top.layui.admin.closeThisTabs();
	}
</script>
</body>
</html>
